package com.bwie.service;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import com.bwie.mapper.GoodsMapper;
import com.bwie.pojo.Goods;

public class GoodsServiceImp implements GoodsService{

	//记录日志
	private static final Logger logger = LoggerFactory.getLogger(GoodsServiceImp.class);
	
	
	@Autowired
	private GoodsMapper goodsMapper;
	
	@Override
	public List<Goods> getBypid(long pid) {
		// TODO Auto-generated method stub	
		try {
			return goodsMapper.getBypid(pid);
		} catch (Exception e) {
			//记录错误
			logger.error("get catalog children by pid = "+pid,e);
			throw e;
		}
	}

}
